using UniversalAdmin.Domain.Entities;

namespace UniversalAdmin.Domain.Repositories;

public interface IDocumentPermissionRepository : IRepository<DocumentPermission>
{
    Task<IEnumerable<DocumentPermission>> GetByDocumentIdAsync(Guid documentId);
    Task<IEnumerable<DocumentPermission>> GetByUserIdAsync(Guid userId);
    Task<IEnumerable<DocumentPermission>> GetByRoleIdAsync(Guid roleId);
    Task<bool> HasPermissionAsync(Guid documentId, Guid userId, PermissionType permissionType);
    Task<IEnumerable<Guid>> GetAccessibleDocumentIdsAsync(Guid userId, PermissionType permissionType);
    Task DeleteByDocumentIdAsync(Guid documentId);
}